package com.lazyfish.superdir.dao;

import com.lazyfish.superdir.entity.Poster;
import com.lazyfish.superdir.entity.Question;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
@Primary
public interface QuestionDao {
    @Select("SELECT * FROM questions")
    List<Question> getQuestionList();
    @Select("SELECT * FROM questions WHERE id = #{id}")
    Question getQuestion(int id);
}
